/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.notify.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 推送用户在线图表Entity
 *
 * @author hf
 * @version 2018-12-24
 */
public class NotiUserOnline extends DataEntity<NotiUserOnline> {

    private static final long serialVersionUID = 1L;
    private String userid;        // 用户id
    private String userName;        // 用户名
    private String appid;        // 产品id
    private String appName;        // 产品名称
    private Date online;        // 上线时间
    private Date offline;        // 下线时间

    public NotiUserOnline() {
        super();
    }

    public NotiUserOnline(String id) {
        super(id);
    }

    @Length(min = 0, max = 64, message = "用户id长度必须介于 0 和 64 之间")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Length(min = 0, max = 64, message = "用户名长度必须介于 0 和 64 之间")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Length(min = 0, max = 64, message = "产品id长度必须介于 0 和 64 之间")
    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    @Length(min = 0, max = 64, message = "产品名称长度必须介于 0 和 64 之间")
    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getOnline() {
        return online;
    }

    public void setOnline(Date online) {
        this.online = online;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getOffline() {
        return offline;
    }

    public void setOffline(Date offline) {
        this.offline = offline;
    }

}